# -*- coding: utf-8 -*-
# @File     : check_data.py
# @Author   : hewenjun
# @Desc     : 描述


def check_key(pre, res):
    try:
        for key in pre.keys():
            assert pre[key] == res[key]
        return 1
    except Exception as e:
        print("=================", e)
        return 0


def check_eq(pre, res):
    try:
        assert pre == res
        return 1
    except Exception as e:
        print("=================", e)
        return 0


def check_in(pre, res):
    try:
        assert pre in res
        return 1
    except Exception as e:
        print("=================", e)
        return 0


def check_len(pre,res):
    try:
        n = len(res)
        assert n >= 1
        return 1
    except Exception as e:
        print("====================", e)
        return 0

